package com.tjtt.tdm.visual.service.impl;

import java.util.List;
import java.util.Map;

import com.tjtt.tdm.base.PageResult;
import com.tjtt.tdm.exception.DaoException;
import com.tjtt.tdm.visual.bean.VisualInfo;
import com.tjtt.tdm.visual.dao.VisualDao;
import com.tjtt.tdm.visual.service.VisualService;

public class VisualServiceImpl implements VisualService{
	private VisualDao visualDao;

	public VisualDao getVisualDao() {
		return visualDao;
	}

	public void setVisualDao(VisualDao visualDao) {
		this.visualDao = visualDao;
	}
	
	public PageResult GetVisualList(Map<String, String> filterMap)
	{
		return visualDao.GetVisualList(filterMap);
	}
	
	public void executeSQL(String sql) throws DaoException
	{
		visualDao.executeBySql(sql);
	}
	
	public VisualInfo GetVisualById(Long id) throws DaoException
	{
		VisualInfo entity = (VisualInfo)visualDao.findById(id);
		return entity;
	}
	
	public void save(VisualInfo entity) throws DaoException
	{
		visualDao.save(entity);
	}
	
	public void saveobject(Object entity) throws DaoException
	{
		visualDao.saveobject(entity);
	}
	
	public void update(VisualInfo entity) throws DaoException
	{
		visualDao.update(entity);
	}
	
	public List findAllBySql(String strSql) throws DaoException
	{
		//return flowtypeDao.findAllBySql(strSql);
		return null;
	}
	public List findAllBySql2(String strSql) throws DaoException
	{
		return visualDao.findAllBySql(strSql);
	}
	
	public void delVisuals(String ids){
		String []id = ids.split(",");
		for(int i=0;i<id.length;i++){
			visualDao.delVisualInfoById(id[i]);
		}
	}
		
	public String getEquipmentPath(String id,String filedName){
		return visualDao.getEquipmentPath(id,filedName);
		
	}

	
	public String getEuipmentData(String id) {
		return visualDao.getEuipmentData(id);
	}

	
	public String getEuipmentTask(String id) {
		return visualDao.getEuipmentTask(id);
	}

	
	public String showEuipmentpersonPic(String id) {
		return visualDao.showEuipmentpersonPic(id);
	}

	
	public List getFloor1() {
		// TODO Auto-generated method stub
		return visualDao.getFloor1();
	}

	
	public List getFloor2() {
		// TODO Auto-generated method stub
		return visualDao.getFloor2();
	}

	
	public List getFloor3() {
		return visualDao.getFloor3();
	}
}
